package com.tvein.sanguo.tool.controller
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.utilities.fabrication.patterns.command.SimpleFabricationCommand;
	//custom
	import com.tvein.sanguo.tool.common.GameConstants;
	import com.tvein.sanguo.tool.view.ToolMediator;
	import com.tvein.sanguo.tool.model.SystemProxy;
//
	public class ToolScript extends SimpleFabricationCommand implements ICommand
	{
		private var toolMediator:ToolMediator;
		private var systemData:SystemProxy;
		
		override public function execute(notification:INotification) : void
		{
			toolMediator = facade.retrieveMediator(ToolMediator.NAME) as ToolMediator;
			systemData = facade.retrieveProxy(SystemProxy.NAME) as SystemProxy;
			
			for (var i:int = 0; i < notification.getBody().Process.length; i++)
			{
				if (notification.getBody().Process[i].Shine)
				{
					toolMediator.toolShell.console("setShine", [notification.getBody().Process[i].Shine, true]);
				}
			}
		}
	}
}